import { defineComponent } from "vue";
import { SettingFilled } from "@ant-design/icons-vue";
import { useTaskStore } from "@/modules/dev-env/task/task-store.ts";
import { useRender } from "@/framework/vue/hooks";
import { hc } from "@/framework/vue/util/render.ts";
import CustomIcon from "@/components/framework/icon";

export const IconTaskDock = defineComponent({
  name: "icon-task-dock",
  components: {
    SettingFilled,
  },
  setup() {
    const taskStore = useTaskStore();

    useRender(() => hc(CustomIcon, { type: "icon-setting", spin: taskStore.taskList.length > 0 }));
  },
});
